home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
self
/
sniff.lha
/
sniff
/
Announcement
< prev
next >
Wrap
Text File
|
1993-07-24
|
10KB
|
269 lines
*********************************************************
* Announcement of the C++ Programming Environment Sniff *
*********************************************************
Walter R. Bischofberger
UBILAB (UBS Informatics Laboratory)
Union Bank of Switzerland
Bahnhofstrasse 45
CH-8021 Zurich/Switzerland
Phone: (0041) 01 236 31 83 (direct)
Fax: (0041) 01 236 46 71 (direct)
Email: bischi@ZH010.ubs.ubs.arcom.ch
Abstract
========
Sniff is a C++/C programming environment providing browsing, cross-
referencing, design visualization, documentation, and editing
support. It delegates compilation and debugging to any C++ compiler
and debugger of choice.
The main goal in developing Sniff was to create an efficient
portable C++ programming environment which makes it possible to edit
and browse large software systems textually and graphically. Much
emphasis was laid on runtime and memory efficiency and on a
comfortable user interface.
History, Availability, and Future of Sniff
===========================================
Sniff was developed in the research laboratory of the Union Bank of
Switzerland (UBS) where it has been used on its own development for
about one year.
Two public domain beta releases of Sniff have been available for
some months. These releases were applied for professional software
development at several places.
This is the announcement of release 1.6. Version 1.6 is the last
public domain release. It has lost the beta.
Now that Sniff is almost finished I want to free myself from the
time consuming porting, support, and maintenance chore. For this
reason UBS cooperates with takeFive - a Salzburg based software
house - which will produce the first commercial release of Sniff
until end of year. A prerequisite for this cooperation is that
universities get further commercial releases of Sniff almost for
free and research laboratories will get Sniff at a fraction of the
commercial price.
Supported Platforms
===================
The newest public domain release (1.6) runs on SPARCstations only.
It requires OS 4.1.2 (it is not tested under 4.1.1) and it runs
under Open Windows and X11 (olwm, mwm, and twm window managers) as
well as under SunView.
takeFive has already ported Sniff to the HP RISC and IBM RS 6000
platforms.
How to Obtain Sniff
===================
Together with this announcement I publish release 1.6 which can be
obtained via anonymous ftp from the following two locations:
* iamsun.unibe.ch (130.92.64.10)
/pub/Sniff1.6 or C++/Sniff1.6 directory
* self.stanford.edu (36.22.0.201 or 36.22.0.41)
/pub/sniff directory
If you have no ftp access send $80 to:
takeFive Software GesmbH
Jakob-Haringer-Str. 8
5020 Salzburg
Austria
Tel. 0043 662 45 79 15
Fax. 0043 662 45 79 15 6
email: info@takeFive.co.at
They will send you a quarter inch tape (other media on request) and
the printed documentation. For $20 you will get the printed
documentation only.
References
==========
Sniff is already used for large scale software development at
several locations. For example:
At UBS a team of twelve software developers switched within two days
from their commercially available programming environment to the
first public domain release of Sniff. They are working on a large
portfolio management system written in C++ which interfaces with a
relational database system.
At MacDonald Dettwiler and Associates, a commercial software house,
seven developers are using Sniff on software systems with up to
250,000 lines of source code and they are happy with Sniff's
responsiveness and user interface.
************************************
* Basic Concepts and Tool Overview *
************************************
Main Tools
==========
A running version of Sniff consists of two operating system
processes, the information extractor and the programming environment
itself. The information extractor can run locally or on any node of
a network. Its task is to extract information about definitions and
declarations from the source code.
The programming environment consists of a number of tools which are
organized around a kernel consisting of the symbol table and the
project manager. Both the symbol table and the project manager
organize information in main storage, which is used by browsers and
editors.
The symbol table manages the information about symbol definitions
and declarations and the project manager manages the information
about open projects such as the source files they consist of and
various attributes.
Information Extraction
======================
Sniff's information extractor is a fuzzy C++ parser. This means that
it understands enough about C and C++ to extract the information of
interest without having to understand C++ completely. This approach
makes it possible to parse every file only once without including
header files and expanding macros.
Not expanding macros is somewhat controversially because it could
result in a loss of information if macros are used to change C++
syntax or semantics. Experience shows that this is no problem. Until
now no user of Sniff has informed us about macro expansion problems.
Not expanding macros means that the symbolic information corresponds
exactly to the locally visible source code. This is frequently an
advantage, for example, when macros are used to put unique prefixes
in front of all class names.
Sniff's information extractor extracts information about
declarations and definitions of C++ language elements and macros. It
does not extract information about the usage of symbols. This
information is extracted on the fly.
Information Updating
====================
If the source code of a project is edited the information about the
location of the affected symbols is updated immediately. On saving a
file its symbolic information is extracted anew and all browsing
tools are updated. A user, therefore, works always with symbol based
tools presenting him information that correctly mirrors the source
code without ever having to bother about the effects of his changes.
Sniff can not know when a source file was changed with another tool
while its symbolic information was loaded. In this case the
developer has to tell Sniff to update its symbol table.
Project Concept
===============
To start working with Sniff a developer has to define a project.
I.e., the source files it contains and eventually a set of
subprojects which can be shared among projects. A subproject is a
complete project on its own.
A typical project structure for a program building on a class
library is to have a root project containing the project specific
source files an to load the library project as subproject. Library
projects are frequently trees of projects themselves.
Whenever a project is opened or when a file or a subproject is
loaded into the current project its source code is analyzed and the
information about the symbols defined therein is stored in Sniff's
symbol table.
Browsers and Editors
====================
Once a new project is defined with the Project Editor or an existing
project is opened it can be browsed and edited in different ways.
* The Symbol Browser can be used to gain an overview about which
symbols are defined in the source code or it displays the results
of queries sent from other tools such as which symbols exist, the
names of which match "X".
* The Class Browser can be used to browse through the locally
defined and inherited members of a class.
* The Hierarchy Browser can be used to display the class graph and
to visualize queries such as "mark all classes declaring method
X".
* The Retriever can be used to obtain information about where a
certain symbol is used in the source code (i.e., cross reference
information). The Retriever is a text search based tool. It makes
it possible to extract all occurrences of strings matching the
name of a symbol (or any regular expression) in a set of projects.
The matches can then be further restricted with semantic filters.
The Retriever provides therefore a much more powerful query
facility than conventional cross referencing tools.
* Sniff's comfortable mouse driven WYSIWYG Editor provides several
kinds of browsing support and it automatically highlights
structurally important information such as class names, method
names, and comments. Once a source file was modified it is
possible to trigger its compilation from the editor and to mark
the source lines where the compiler found syntax errors. The
current version of Sniff does not provide an emacs interface.
Because of the flood of requests we will provide emacs support
with one of the next versions.
Efficiency
==========
The loading of a project with 100,000 lines of code takes on a
SPARCstation2 about 20 Seconds. Sniff needs with 100,000 lines of
code loaded between 5 and 8 MB main storage (depending on how many
tools are open). For every further 100,000 lines of code 3 to 4 MB
are needed.
For a project with 100,000 lines of code Symbolic queries (e.g.,
show all classes the names of which contain a certain string) can be
answered in less than a second. Cross reference queries based on
text search are answered in less than three second (once Sniff's
internal cache is loaded). The most frequent cross reference queries
are even answered in less than a second.
*******************
* Acknowledgments *
*******************
My sincere thanks go to the Union Bank of Switzerland that gave me
the freedom and founding which made it possible to develop Sniff
and to distribute it in the public domain.
The development of Sniff would not have been possible without the
ET++ application framework and the support of its developers Erich
Gamma and Andre Weinand.
A good user interface has to grow. Thanks to all my colleagues who
have been working with Sniff for several months giving me the
feedback I needed.